package io.renren.modules.sp.controller.front;

import io.renren.common.utils.Result;
import io.renren.modules.sp.dto.SpUserDTO;
import io.renren.modules.sp.service.TAreaService;
import io.renren.modules.sys.dto.ParamDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


/**
 * 基础controller
 *
 * @author whc 15953295779@126.com
 * @since 3.0 2022-04-22
 */
@RestController
@RequestMapping("front/area")
public class FrontAreaController {

    @Autowired
    private TAreaService tAreaService;

    /**
     * 根据地区编码查询地区信息
     */
    @GetMapping("list")
    public Result<List<ParamDto>> queryByCode(String pid) {
        List<ParamDto> list = tAreaService.queryByCode(pid);
        return new Result<List<ParamDto>>().ok(list);
    }


}
